class Solution {
public:
    string replaceSpace(string s) {
        string str;
        for (const auto& s : s)
        {
            if (s != ' ')
                str += s;
            else
            {
                str += '%';
                str += '2';
                str += '0';
            }
        }
        return str;
    }
};